Per-chapter printing + print preview #109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to last milestone of #100
This PR introduces per-chapter printing and print-preview.
The way this works is that the user is redirected to a print-friendly rendition of the epub when they enter Ctrl/Cmd-P on their keyboard or click on the new print icon in the header:
This approach was taken because epubjs-reader and a number of the already existing features are tied pretty heavily into the existing layout, so doing this without introducing a new view would require a substantial amount of work and reworking previous features.
The new print-friendly view displays only a chapter at a time, with a select to choose a new chapter (or navigate to chapter sub-sections - this can be removed to only have top-level chapter headings if it feels busy or confusing), and a button to return to the main view with full functionality:
Some additional work on margins may still be needed but this new view has a much better layout for printing and print preview: